<template>
	<view class="container">
		<uni-section title="评论" sub-title="" type="line">
			<uni-list>
				<uni-list-item :title="item.comment" note=""></uni-list-item>
			</uni-list>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item:{},
				id:''
			}
		},
		methods: {
			get(){
				uni.request({
					url: 'http://localhost:8090/foodapp/comment/findone',
					method: 'POST',
					data: {
						id:this.id
					},
					success: res => {
						if(res.data.success){
							this.item=res.data.data
						}
					},
					fail: () => {},
					complete: () => {}
				});
			}
		},
		onLoad: function(option){
			this.id=option.id
		},
		onShow() {
			this.get()
		}
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
